<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button id="btn">输入框</button>
你好
<script>
/*
 alt + ctrl + L     格式化代码
 ctrl + d  复制一行
 
 
  */
var btn = document.getElementById("btn");
btn.onclick = function (){
    /*var age = prompt("请输入你的年龄:", "18")
     alert(age)*/
    
    /*var isOk = confirm("你真的要退出吗?")
     alert(isOk)*/

    console.log("这个肯定打印在控制台");
    console.log(btn);
}
</script>

</body>

</html>